<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <h4>event.target 属性返回哪个 DOM 元素触发了事件</h4>
  <div onclick="console.log('first div',event.target)">
      <div onclick="console.log('second div')">
          <button onclick="console.log('button')">click!</button>
      </div>
  </div>
  <h4>点击出发所有的嵌套元素的点击事件</h4>
<p>对e.target与e.currentTarget有了些理解</p>
<p>1、e.target：指向触发事件监听的对象</p>
<p>2、e.currentTarget：指向添加监听事件的对象</p>
</body>
</html>